package com.zyajac.springBootDemo.entity;

import java.util.ArrayList;
import java.util.List;

public class SimpleData {

    private static List<SimpleData> simpleDataList;

    static {
        simpleDataList = new ArrayList<>();
        simpleDataList.add(new SimpleData("亚度家居", "01", ""));
        simpleDataList.add(new SimpleData("成都办公中心", "02", "01"));
        simpleDataList.add(new SimpleData("中江生产基地", "03", "01"));
        simpleDataList.add(new SimpleData("营销中心", "04", "02"));
        simpleDataList.add(new SimpleData("技术中心", "05", "02"));
        simpleDataList.add(new SimpleData("人才孵化园", "06", "02"));
        simpleDataList.add(new SimpleData("前端组", "07", "05"));
        simpleDataList.add(new SimpleData("后端组", "08", "05"));
        simpleDataList.add(new SimpleData("实习组", "09", "05"));
        simpleDataList.add(new SimpleData("设计师中心", "10", "06"));
        simpleDataList.add(new SimpleData("华西营销", "11", "04"));
        simpleDataList.add(new SimpleData("华东营销", "12", "04"));
        simpleDataList.add(new SimpleData("华中营销", "13", "04"));
        simpleDataList.add(new SimpleData("华北营销", "14", "04"));
    }

    private String departName;

    private String departID;

    private String parentID;



    /**/
    public static List<SimpleData>  getDataByPID(String ID){
        List<SimpleData> result = new ArrayList<>();
        for (SimpleData simpleData :
               simpleDataList ) {
            if(ID.equals(simpleData.getParentID())){
                result.add(simpleData);
            }
        }
        return  result;
    }

    public SimpleData(String departName, String departID, String parentID) {
        this.departName = departName;
        this.departID = departID;
        this.parentID = parentID;
    }

    public SimpleData() {
    }

    public String getParentID() {
        return parentID;
    }

    public void setParentID(String parentID) {
        this.parentID = parentID;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getDepartID() {
        return departID;
    }

    public void setDepartID(String departID) {
        this.departID = departID;
    }
}
